import request from '@/utils/request'

// 查询仓库信息列表
export function listBaseWarehouse (query) {
  return request({
    url: '/baseinfo/baseWarehouse/list',
    method: 'get',
    params: query
  })
}

// 查询仓库信息详细
export function getBaseWarehouse (id) {
  return request({
    url: '/baseinfo/baseWarehouse/' + id,
    method: 'get'
  })
}

// 新增仓库信息
export function addBaseWarehouse (data) {
  return request({
    url: '/baseinfo/baseWarehouse',
    method: 'post',
    data: data
  })
}

// 修改仓库信息
export function updateBaseWarehouse (data) {
  return request({
    url: '/baseinfo/baseWarehouse',
    method: 'put',
    data: data
  })
}

// 删除仓库信息
export function delBaseWarehouse (id) {
  return request({
    url: '/baseinfo/baseWarehouse/' + id,
    method: 'delete'
  })
}

// 导出仓库信息
export function exportBaseWarehouse (query) {
  return request({
    url: '/baseinfo/baseWarehouse/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/baseinfo/baseWarehouse/getInitData/' + dictTypes,
    method: 'get'
  })
}
